<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        var str="我爱你";
        var arr = []
        for(var i=0;i<str.length;i++){
            // console.log(str.charCodeAt(i));
            arr[i] = str.charCodeAt(i);
        }
        console.log(arr);
        console.log(String.fromCharCode(arr[0], arr[1], arr[2]));
        // console.log(String.fromCharCode(arr[1]));
        // console.log(String.fromCharCode(arr[2]));
        
    </script>
</body>
</html>